<?

class Kato_VanillaTable extends Zend_Db_Table {
	public function getPrimary(){
		return $this->_primary;
	}
	
	    protected function _setupPrimaryKey(){
	    	try {
	    		parent::_setupPrimaryKey();
	    	} catch (Zend_Db_Table_Exception $e){
	    		
	    		// we fall back on the leftmost column - and will likely get runtime
	    		// errors on updates and deletes.

	    		reset($this->_metadata);
	    		$col = each($this->_metadata);
	    		$this->_primary = array($col['key']);
	    	}
	    }

}
